package org.firebug.spring.boot.dubbo.provider.service;

import org.firebug.spring.boot.dubbo.api.service.ICalcService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CalcService implements ICalcService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Override
    public int add(int a, int b) {
        logger.info("a + b = {}", a + b);
        return a + b;
    }

    @Override
    public int sub(int a, int b) {
        logger.info("a - b = {}", a - b);
        return a - b;
    }

    @Override
    public int mul(int a, int b) {
        logger.info("a * b = {}", a * b);
        return a * b;
    }

    @Override
    public int div(int a, int b) {
        logger.info("a / b = {}", a / b);
        return a / b;
    }
}
